package 引用类型编程题1;

public class Student {
    private String name;
    private String gender;
    private int age;
    private Cat cat;

    public Student(){}

    public Student(String name, String gender, int age, Cat cat) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.cat = cat;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Cat getCat() {
        return cat;
    }

    public void setCat(Cat cat) {
        this.cat = cat;
    }
    public void selfIntroduce(){
        System.out.println("My name's "+name+", I'm "+age+"years old, I have a cute "+cat.getAge()+"years old cat " +
                "named "+cat.getName());
    }
}
